package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;

@Mapper
public interface UserMapper {
	
	@Select("select * from user where openid=#{openid}")
	User getUserOpenid(String openid);
	
	/**
	 * 登录
	 *
	 * @param user
	 * @return
	 */
	void login(User user);
	
	@Select("select * from user where id=#{id}")
	User getUserId(Long id);
	
	
	Integer countNumber(LocalDateTime begin, LocalDateTime end);
}
